<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    # Prevent direct access to config
    <FilesMatch "^config\.php$">
        Order allow,deny
        Deny from all
    </FilesMatch>
</IfModule>

# Enable PHP execution
AddType application/x-httpd-php .php

# Set proper headers
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
</IfModule>

# Error handling
php_flag display_errors Off
php_flag log_errors On
